package com.bosssoft.trainee.mbg.po;

import com.baomidou.mybatisplus.annotation.*;
import com.bosssoft.trainee.mbg.util.handler.ListOfIntegerHandler;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

/**
 * @Author: wuxin
 * @Date: 2022/6/12
 * @Project rbac
 * @Version 1.0
 * @Description
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@TableName(value = "r_user")
public class User implements Serializable {
    @TableId(value = "u_id",type = IdType.AUTO)
    private Integer  id;
    @TableField(value = "u_username")
    private String username;
    @TableField(value = "u_password")
    private String password;
    @TableField(value = "u_email")
    private String email;
    @TableField(value = "u_phone")
    private String phone;
    @TableField(value = "u_worker_mum")
    private String workerNum;
    @TableField(value = "u_sex")
    private Integer sex;
    @TableField(value = "u_birthday")
    private Date birthday;
    @TableField(value = "u_company_id")
    private Integer companyId;
    @TableField(value = "u_department_id")
    private Integer departmentId;
    @TableField(value = "u_position_id")
    private Integer positionId;
    @TableField(value = "u_role_ids",typeHandler = ListOfIntegerHandler.class)
    private List<Integer> roleIds;
    @TableField(value = "u_state")
    private Integer state;
    @TableField(value = "u_create_time",fill = FieldFill.INSERT)
    private Date createTime;
    @TableField(value = "u_resources",typeHandler = ListOfIntegerHandler.class)
    private List<Integer> resources;
    @TableField(value = "u_update_time",fill = FieldFill.INSERT_UPDATE)
    @Version
    private Date updateTime;
}
